﻿using System.ComponentModel.DataAnnotations;

namespace net8.Models.Wangzhan
{
    /// <summary>
    /// 新闻表
    /// </summary>
    public class WZNews : Base
    {
        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage ="不能空")]
        [StringLength(50, MinimumLength = 2, ErrorMessage = "长度在2-50之间")]
        public string Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [StringLength(4000, MinimumLength = 2, ErrorMessage = "长度在2-4000之间")]
        public string Content { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        [StringLength(20, MinimumLength = 2, ErrorMessage = "长度在2-20之间")]
        public string Author { get; set; }

        public string ImageUrl { get; set; }
    }
}
